﻿using Microsoft.AspNetCore.Mvc;
using WebApplication1.BLL;
using WebApplication1.Entity;
using WebApplication1.IBLL;
using WebApplication1.Model;
using static System.Runtime.InteropServices.JavaScript.JSType;

namespace WebApplication1.Controllers
{
    [ApiController]
    [Route("API/[controller]")]
    public class UserController : Controller
    {
        private static IUserBLL userBLL = new UserBLL();
        [HttpGet("GetList")]
        public JsonMessage GetList()
        {
            JsonMessage jsonMessage = new JsonMessage();
            try
            {
                var list = userBLL.GetList();
                jsonMessage.Successes(list, "登录成功");
            }
            catch (Exception)
            {

                throw;
            }
            return jsonMessage;
        }
    }
}
